import java.io.*;
import java.util.ArrayList;

public class A622 {
	public static void printResult(ArrayList<String> refTeams, int maxLength, StringBuffer refOutput) {
		for(int i = 0; i < maxLength; i++) {
			for(int j = 0; j < refTeams.size(); j++) {
				if(i < refTeams.get(j).length())
					refOutput.append(refTeams.get(j).charAt(i));
				else
					refOutput.append(" ");
				
				if(j != refTeams.size() - 1)
					refOutput.append("  ");
			}
			refOutput.append("\n");
		}
		
		System.out.print(refOutput);
	}
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String input;
		ArrayList<String> teams = new ArrayList<String>();
		int maxLen = 0;
		StringBuffer output = new StringBuffer();
		
		while((input = br.readLine()) != null) {
			if(input.equals("END")) {
				printResult(teams, maxLen, output);
				break;
			} else {
				teams.add(input);
				if(input.length() > maxLen)
					maxLen = input.length();
			}
		}
	}
}